package megrez.mail.sender.web.vo;

import org.springframework.beans.BeanUtils;

import lombok.Data;
import megrez.mail.sender.domain.MailContentType;
import megrez.mail.sender.domain.TemplateConfig;

/**
 * 模板配置
 * 
 * @author Lucky Yang
 * @since 2.6.9
 */
@Data
public class TemplateConfigInput {
    private MailContentType type;
    private String code;
    private String remark;
    private Boolean enabled;

    public TemplateConfigInput() {
    }

    public TemplateConfigInput(MailContentType type, String code, String remark, Boolean enabled) {
        this.type = type;
        this.code = code;
        this.remark = remark;
        this.enabled = enabled;
    }

    public TemplateConfig copyTo(TemplateConfig config) {
        BeanUtils.copyProperties(this, config);
        return config;
    }
}
